<head>
	<link rel="stylesheet" type="text/css" href="./html/common.css" />
</head>
<div class="content">
	<div class = "setTitle">
		友链管理 
		<div class="smallinput">
			<form action="trans.php?action=addlink" method="POST" enctype="multipart/form-data">
				<input style="width:100px;" name="index" type="text" placeholder="友链序号"/> 
				<input style="width:100px;" name="name" type="text" placeholder="友链名称"/> 
				<input style="width:100px;" name="url" type="text" placeholder="友链地址"/> 
				<input name="headpic" type="file"/> 
				<input style="width:100px;" name="introduce" type="text" placeholder="友链介绍"/> 
				<input style="width:100px;" name="color" type="text" placeholder="友链颜色"/> 
				<input style="width:100px;" type="submit" value="添加友链"/>
			</form>
		</div>
	</div>
	<form action="trans.php?action=updatelink" method="POST">
		<table class="setTable">
			<tbody>
				<tr>
					<th>顺序</th>
					<th>名称</th>
					<th>地址</th>
					<th>头像</th>
					<th>介绍</th>
					<th>颜色</th>
					<th>管理</th>
				</tr>
				
					{foreach $link as $value}
					<tr>
						<td style="width:4%;">
							<input name="id[]" type="hidden" value="{$value.id}">
							<input style="width:100%;" name="index[]" type="text" value="{$value.index}">
						</td>
						<td style="width:8%;"><input style="width:100%;" name="name[]" type="text" value="{$value.name}"></td>
						<td><input style="width:100%;" name="url[]" type="text" value="{$value.url}"></td>
						<td style="width:10%;"><input style="width:100%;" name="headpic[]" type="text" value="{$value.headpic}"></td>
						<td><input style="width:100%;" name="introduce[]" type="text" value="{$value.introduce}"></td>
						<td style="width:7%;" ><input style="width:100%;" name="color[]" type="text" value="{$value.color}"></td>
						<td><a href="trans.php?action=deletelink&id={$value.id}">删除</a></td>
					</tr>
					{/foreach}
			</tbody>
		</table>
		<div class="adminSub">
			<input type="submit" value="提交"/>
		</div>
	</form>
</div>
